<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生课程成绩页面</title>
</head>
<body>
<h2 >学生课程成绩信息</h2>
<div>欢迎${studentCourses.stuName}同学！您的成绩如下：</div><hr>
<c:choose>
    <c:when test="${info=='fail'}">
        <div>目前您还没有选中课程！</div>
    </c:when>
    <c:otherwise>
        <table border="1" cellspacing="1" width="800" bgcolor="#556b2f">
            <tr>
                <th width="50px">课程</th>
                <th width="50px">成绩</th>
            </tr>
                <%--varStatus:标识状态，id一般不写，自动动态的生成,status(index,count)--%>
            <c:forEach items="${studentCourses.map}" var="studentCourse">
                <tr align="center">
                    <td>${studentCourse.key}</td>
                    <td>${studentCourse.value}</td>
                </tr>
            </c:forEach>
        </table>
        <div>平均分：${studentCourses.avg}</div><hr>
    </c:otherwise>
</c:choose>
<hr>
<a href="/student/getAll">回到首页</a>

</body>
</html>
